/*
 * Copyright (c) 2003-2005
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.hibernate.pojo;

import java.util.Map;

/**
 * test pojo to test primitive properties and ID
 *
 * @hibernate.class table="map-table"
 */
public class MapMapping {
    private Map _map;

    public void setElement(Map map) {
        _map = map;
    }

    /**
     * test element map
     *
     * @hibernate.map lazy="extra"
     * @hibernate.element type="string" column="value"
     * not-null="false" unique="false"
     * @hibernate.index type="baz"
     */
    public Map getElement() {
        return _map;
    }

    /**
     * @hibernate.id unsaved-value="blurge" generator-class="native"
     */
    public long getId() {
        return 0;
    }

    /**
     * Test many to any generation
     *
     * @hibernate.map
     * @hibernate.key column="baz"
     * @hibernate.index-many-to-any id-type="long"
     * @hibernate.index-column name="ind_clazz_"
     * @hibernate.index-column name="ind_id_"
     * @hibernate.many-to-any id-type="long"
     * @hibernate.any-column name="el_clazz_"
     * @hibernate.any-column name="el_id_"
     */
    public Map getManyToAny() {
        return _map;
    }

    /**
     * test one-to-many set
     *
     * @hibernate.map table="blurge" schema="baz" lazy="true" inverse="false"
     * sort="blabla" cascade="all" order-by="foo" where="bar"
     * outer-join="auto"
     * @hibernate.index type="blurge"
     * @hibernate.index-column name="foo"
     * @hibernate.index-column name="bar"
     * @hibernate.one-to-many class="org.xdoclet.plugin.hibernate.pojo.Simple" not-found="exception"
     */
    public Map getOneToMany() {
        return _map;
    }

    /**
     * test one-to-many set
     *
     * @hibernate.map table="blurge"
     * @hibernate.index type="blurge"
     * @hibernate.index-column name="foo"
     * @hibernate.index-column name="bar"
     * @hibernate.key
     * @hibernate.key-column name="column1"
     * @hibernate.key-column name="column2"
     * @hibernate.one-to-many class="org.xdoclet.plugin.hibernate.pojo.Simple" not-found="ignore"
     */
    public Map getOneToManyWithMultipleKeys() {
        return _map;
    }

    public void setOneTopMany(Map map) {
        _map = map;
    }

    public void setOneTopManyWithMultipleKeys(Map map) {
        _map = map;
    }
}